home *** CD-ROM | disk | FTP | other *** search
Wrap
(*^ ::[paletteColors = 128; currentKernel; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8, 24, "Times"; ; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6, 18, "Times"; ; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6, 14, "Times"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20, 18, "Times"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15, 14, "Times"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12, 12, "Times"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = input, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = print, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = info, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1, 12, "Courier"; ; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1, 10, "Times"; ; fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = Left Header, nohscroll, cellOutline, 12; fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1, 12; fontset = Left Footer, cellOutline, blackBox, 12; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12, "Courier"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; next21StandardFontEncoding; ] :[font = title; inactive; Cclosed; preserveAspect; startGroup; ] Lab 7: Series :[font = text; inactive; preserveAspect; ] We studied infinite series in Sections 10.12-10.5 of Stein's textbook. This lab investigates geometric and harmonic series in more detail and pursues some unsolved problems related to them. Pages 207-213 in the Crooke/Ratcliffe Guidebook cover some of this material. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Geometric Series :[font = text; inactive; preserveAspect; ] A geometric series is an infinite series in which the ratio of consecutive terms is constant. This ratio, r = (a[n+1]) / (a[n]), is called the constant ratio of the geometric series. We proved in class that the geometric series converges if and only if -1 < r < 1 , and in this case the series converges to the sum (a[1]) / (1 - r) . ;[s] 3:0,0;144,1;158,2;338,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] Example :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here is Example 1 on page 495: :[font = input; preserveAspect; ] s[n_] := NSum[ 0.8^i, {i,0,n-1} ] :[font = text; inactive; preserveAspect; ] This defines the s[n] to be the partial sum of the first n terms of the geometric series: 1 + 0.8 + 0.8^2 + 0.8^3 + . . . + 0.8^(n-1) . :[font = text; inactive; preserveAspect; ] The NSum command computes the sum numerically, producing a decimal approximation. For example: ;[s] 3:0,0;3,1;9,2;96,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; endGroup; ] s[5] :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here are the first 5 partial sums, just as is shown at the bottom of page 495: :[font = input; preserveAspect; ] Table[ {n, s[n]}, {n,1,5} ] // TableForm :[font = text; inactive; preserveAspect; endGroup; ] The TableForm function displays the data in tabular form (i.e. in columns). ;[s] 3:0,0;3,1;14,2;454,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] The sum of this series is (a[1]) / (1 - r) = 1 / (1 - 0.8) : :[font = input; preserveAspect; endGroup; ] 1/(1-0.8) :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] We can see the rapid convergence to this limit more clearly by the subsequence of every fifth term: a[5], a[10], a[15], . . . This can be generated by replacing n with 5k and letting k range from 1 to 20: ;[s] 7:0,0;161,1;164,2;168,3;172,4;183,5;186,6;206,-1; 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; endGroup; ] Table[ {5k, s[5k]}, {k,1,20} ] // TableForm :[font = text; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] It looks like the sequence of partial sums has already converged to its limit before reaching the 100th partial sum. But that is an illusion due to round-off error. The N function gives a more accurate estimate of s[100]: ;[s] 4:0,0;170,1;173,2;201,3;202,-1; 4:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] N[s[100],50] :[font = text; inactive; preserveAspect; endGroup; endGroup; ] This command asks for 50 decimal digits. The trailing zeros are omitted. The output shows that s[100] is very close to the limit 5, but not there yet. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] Exercises :[font = text; inactive; preserveAspect; ] For each of the following exercises in Stein's book: (a) use the NSum function to define the sequence s[n] of partial sums; (b) use the Table command to investigate the convergence; (c) compute specific values of s[n] (e.g. N[s[1000],50], N[s[2000],50], etc.) to estimate the limit; (d) compute the limit directly from the formula (a[1]) / (1 - r); (e) compare your results with what you did on your homework. ;[s] 5:0,0;65,1;71,2;137,3;144,4;424,-1; 5:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; preserveAspect; ] 1. {5p.499} :[font = text; inactive; preserveAspect; ] 2. {7p.499} :[font = text; inactive; preserveAspect; endGroup; endGroup; ] 3. {15p.500} :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Harmonic Series and Euler's Constant :[font = text; inactive; preserveAspect; ] The harmonic series is: 1 + 1/2 + 1/3 + 1/4 + 1/5 + . . . We proved in class that this series diverges; its sequence of partial sums increases without bound. ;[s] 3:0,0;96,1;104,2;160,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here is the sequence of partial sums for the harmonic series: :[font = input; preserveAspect; endGroup; ] s[n_] := NSum[ 1/i, {i,1,n} ] :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here are the first 16 partial sums: :[font = input; preserveAspect; ] Table[ {n, s[n]}, {n,1,16} ] // TableForm :[font = text; inactive; preserveAspect; endGroup; ] From this limited list it is not clear that the series diverges. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here are the partial sums indexed by the first 16 powers of 2 (i.e. n = 2, 4, 8, 16, 32, 64, . . ., 65536): :[font = input; preserveAspect; ] Table[ {2^k, s[2^k]}, {k,1,16} ] // TableForm :[font = text; inactive; preserveAspect; endGroup; ] These partial sums seem to be increasing at almost a constant rate. :[font = text; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] To view explicitly the rate at which those sums are increasing, we'll reproduce the table and include the differences between successive sums: :[font = input; preserveAspect; ] Table[ {2^k, s[2^k], s[2^k]-s[2^(k-1)]}, {k,1,10} ] // TableForm :[font = text; inactive; preserveAspect; endGroup; ] This shows that (after the first few) each sum is about 0.69 more than its predecessor. So the sums cannot possibly converge: they will continue to increase without bound. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] We saw in class that the partial sums of the harmonic series increase like Log[n]. Specifically, we used the integral of 1/x to show that Log[n+1] < s[n] < 1 + Log[n] . The following table shows that s[n] and Log[n] increase at the same rate: :[font = input; preserveAspect; ] Table[ {2^k, s[2^k], N[Log[2^k]]}, {k,1,16} ] // TableForm :[font = text; inactive; preserveAspect; endGroup; ] The sum of the first 65536 terms of the harmonic series is quite close to Log[65536]: 11.6676 and 11.0904 differ by less than 0.6 . :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] To study these two sequences more closely, let f [n] be their difference: :[font = input; preserveAspect; endGroup; ] Clear[f]; f[n_] := s[n] - N[Log[n]] :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Now examine the previous table again, with the difference f [n] included: :[font = input; preserveAspect; ] Table[ {2^k, s[2^k], N[Log[2^k]], f[2^k]}, {k,1,16} ] // TableForm :[font = text; inactive; preserveAspect; endGroup; ] As n increases, the difference between s[n] and Log[n] approaches some constant near 0.5772 . This remarkable fact was discovered by Leonhard Euler over two hundred years ago (without the aid of Mathematica!). ;[s] 3:0,0;196,1;207,2;211,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] The limit of f [n] is called Euler's constant. It is a universal mathematical constant, like p and e. It is denoted by g (the Greek letter gamma). Mathematica knows it as EulerGamma (just as it knows p as Pi and e as E). The N function produces a numerical (decimal) approximation to g: ;[s] 21:0,0;31,1;47,2;96,3;97,4;123,5;124,6;152,7;163,8;175,9;187,10;205,11;206,12;209,13;213,14;221,15;223,16;230,17;233,18;290,19;291,20;294,-1; 21:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0; :[font = input; preserveAspect; ] N[EulerGamma] :[font = text; inactive; preserveAspect; ] Evidently, f [n] approaches this number as a limit: :[font = input; preserveAspect; ] Table[ f[n], {n,1,16} ] :[font = input; preserveAspect; endGroup; ] Table[ f[2^k], {k,1,16} ] :[font = subsection; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] Exercises :[font = text; inactive; preserveAspect; ] 1. Examine f [n] for large n (up to a billion). Compare it to N[EulerGamma,10]. Determine to how many decimal places f [1000000000] agrees with EulerGamma. :[font = text; inactive; preserveAspect; endGroup; endGroup; ] 2. Examine Euler's constant to a large number (at least 100) of decimal places. See if you can discern any pattern to the digits. Recall that a number is rational if and only if it has a repeating decimal expansion. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] p-Series and Riemann's Zeta Function :[font = text; inactive; preserveAspect; ] The harmonic series is one of the family of p-series ( sum of 1 / (n^p) ), so named because the series are parametrized with the parameter p. ;[s] 3:0,0;44,1;52,2;212,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] We can define one function to cover the entire family of p-series by using p as a variable: :[font = input; preserveAspect; endGroup; ] s[p_,n_] := NSum[ 1/i^p, {i,1,n} ] :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Then s[1,n] is the partial sum of the first n terms of the harmonic series: :[font = input; preserveAspect; ] Table[ {n, s[1,n]}, {n,1,10} ] // TableForm :[font = text; inactive; preserveAspect; ] and s[2,n] is the partial sum of the first n terms of the series 1 + 1/4 + 1/9 + . . . : :[font = input; preserveAspect; endGroup; ] Table[ {n, s[2,n]}, {n,1,10} ] // TableForm :[font = text; inactive; preserveAspect; ] In class, we used the Integral Test to show that a p-series converges if and only if p > 1. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here are the partial sums of the p-series for p=2, indexed by powers of 10: :[font = input; preserveAspect; ] Table[ {10^k, s[2,10^k]}, {k,0,8} ] // TableForm :[font = text; inactive; preserveAspect; endGroup; ] Evidently, this series converges to 1.64493... :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] It is shown in advanced mathematics courses that this limit is actually: :[font = input; Cclosed; preserveAspect; startGroup; ] N[Pi^2/6] :[font = output; output; inactive; preserveAspect; endGroup; endGroup; ] 1.644934066848226 ;[o] 1.64493 :[font = text; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] Similarly, the p-series with p=4 ( sum of 1 / (n^4) ) converges to: :[font = input; preserveAspect; ] Table[ {10^k, s[4,10^k]}, {k,0,8} ] // TableForm :[font = text; inactive; preserveAspect; ] which is: :[font = input; preserveAspect; ] N[Pi^4/90] :[font = text; inactive; preserveAspect; endGroup; ] Since the p-series converges for all p > 1, it defines a function of p: 1 / (1^p) + 1 / (2^p) + 1 / (3^p) + 1 / (4^p) + 1 / (5^p) + . . . + 1 / (n^p) + . . . This function was originally studied by Euler. Later, Georg Riemann (the same mathematician after whom Riemann sums are named) studied the function with p ranging over all complex numbers (x + i y). He denoted the function by z(p) (z is the Greek letter zeta). Since then, it has been known as the Riemann zeta function z(p). ;[s] 9:0,0;400,1;401,2;406,3;407,4;473,5;494,6;495,7;496,8;500,-1; 9:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Mathematica knows the Riemann zeta function as Zeta[p]: ;[s] 4:0,0;11,1;46,2;54,3;56,-1; 4:1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] Zeta[2] :[font = input; preserveAspect; ] Zeta[4] :[font = text; inactive; preserveAspect; ] These are the limits that we obtained above for s[2,n] and s[4,n]: :[font = input; preserveAspect; ] { N[Zeta[2]], N[s[2,1000000]] } :[font = input; preserveAspect; endGroup; ] { N[Zeta[4]], N[s[4,1000000]] } :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here is the graph of the Riemann zeta function for p in the range 2 to 8: :[font = input; preserveAspect; ] Plot[ Zeta[x], {x,1.5,8}] ; :[font = text; inactive; preserveAspect; endGroup; ] The value at x=2 is about 1.64493, and the value at x=4 is about 1.08232. :[font = text; inactive; preserveAspect; ] As a function of a complex variable, the Riemann zeta function has fascinated mathematicians for over a century. Riemann himself conjectured in 1859 that the only complex numbers p at which z(p)=0 are those whose real part is 1/2. That means that the complex number p=x+iy must have x=1/2 in order for z(p)=0. Whether this is true is still unknown. This is the celebrated Riemann Hypothesis. It is one of the great unsolved problems in mathematics. ;[s] 13:0,0;180,1;181,2;191,3;192,4;193,5;194,6;305,7;306,8;307,9;308,10;378,11;396,12;805,-1; 13:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] We can study the Riemann zeta function at complex values whose real part is 1/2 by using the variable p = 1/2 + I*y. (Mathematica uses I for the constant i, the square root of -1.) ;[s] 9:0,0;101,1;115,2;119,3;130,4;135,5;138,6;155,7;156,8;182,-1; 9:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] Plot[ Abs[ Zeta[1/2+I*y] ], {y,0,35} ]; :[font = text; inactive; preserveAspect; ] We see here that the Riemann zeta function has 5 zeros (places where the function is 0) in the range 0 to 35 for y. We have to use the absolute value function Abs because the actual values of the zeta function are complex numbers. ;[s] 5:0,0;113,1;114,2;159,3;209,4;214,-1; 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,10,8,Courier,1,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup; ] The chart on the wall in the Workstation Lab shows the graph of the Riemann zeta function for a much larger range of y. This active area of mathematical research has been facilitated by the use of Mathematica. ;[s] 5:0,0;117,1;118,2;198,3;209,4;212,-1; 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = subsection; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] Exercises :[font = text; inactive; preserveAspect; ] 1. Use the Riemann zeta function to obtain a numerical value for the sum of: (a) the p-series with p=3. (b) the p-series with p=6. (c) the p-series with p=1.01. :[font = text; inactive; preserveAspect; ] 2. Mathematica can give symbolic (i.e. exact) values for the sum of the p-series when p is an even positive integer. For example, we saw above that the sum for p=2 was Pi^2/6. Obtain the symbolic value of the sum of: (a) the p-series with p=6. (b) the p-series with p=8. (c) the p-series with p=10. :[font = text; inactive; preserveAspect; ] 3. Why is the Riemann zeta function asymptotic to the X-axis? :[font = text; inactive; preserveAspect; ] 4. What happens to Zeta[p] as p approaches 1? :[font = text; inactive; preserveAspect; ] 5. How many zeros does the Riemann zeta function have in the range of y: (a) 0 to 50 ? (b) 50 to 100 ? (c) 100 to 150 ? ;[s] 3:0,0;71,1;72,2;128,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup; endGroup; endGroup; ] 6. Estimate to five significant digits the smallest positive zero (near y=14). ;[s] 3:0,0;73,1;74,2;80,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; ^*)